package com.example.demo.service.impl;

import com.example.demo.dao.BannerDao;
import com.example.demo.entity.Banner;
import com.example.demo.service.BannerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BannerServiceImpl implements BannerService {

    @Resource(type = BannerDao.class)
    private BannerDao bannerDao;

    @Override
    public BannerDao getBannerDao() {
        return bannerDao;
    }

    public Banner getById(Integer id) {
        return bannerDao.getById(id);
    }

    public Banner getByEntity(Banner banner) {
        return bannerDao.getByEntity(banner);
    }

    public List<Banner> listByEntity(Banner banner) {
        return bannerDao.listByEntity(banner);
    }

    public List<Banner> listByIds(List<Integer> ids) {
        return bannerDao.listByIds(ids);
    }

    public int insert(Banner banner) {
        return bannerDao.insert(banner);
    }

    public int insertBatch(List<Banner> list) {
        return bannerDao.insertBatch(list);
    }

    public int update(Banner banner) {
        return bannerDao.update(banner);
    }

    public int updateBatch(List<Banner> list) {
        return bannerDao.updateBatch(list);
    }

    public int deleteById(Integer id) {
        return bannerDao.deleteById(id);
    }

    public int deleteByEntity(Banner banner) {
        return bannerDao.deleteByEntity(banner);
    }

    public int deleteByIds(List<Integer> list) {
        return bannerDao.deleteByIds(list);
    }

    public int countAll() {
        return bannerDao.countAll();
    }

    public int countByEntity(Banner banner) {
        return bannerDao.countByEntity(banner);
    }

}
